public class B2 {
    //计算20！的值
    public static void main(String[] args) {
        long s = 0, t = 1;
        int n;
        for (n = 1;n<20;n++){
            t = t * n ;
            //求n!
            s = s + t ;
            //将各项累加
        }
        System.out.println("1!+2!+......+20!=\n"+s);
    }
}
